package com.pan.service;

import com.pan.entity.Result;
import com.pan.entity.Stock;
import com.pan.vo.StockInsertVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface StockService {
    Result<Long> insert(String adminTicket, StockInsertVo stockInsertVo);

    @Transactional
    Result updateReduceStock(String adminTicket, Long id, Long reduceCounts);

    Result<Stock> selectById(String adminTicket, Long id);

    Result<List<Stock>> selectAllByGoodsId(String adminTicket, Long goodsId);

    Result<List<Stock>> selectByGoodsId(String adminTicket, Long goodsId);

    Result<Long> getGoodsCount( Long goodsId);
}
